package com.gulimall.auth.feign;

import com.atguigu.common.utils.R;
import com.gulimall.auth.feign.impl.SmsFeignServiceCallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Description
 * @Author lhj
 * @Date 2024/3/2 10:37
 */
@FeignClient(name = "gulimall-third-party", contextId = "SmsFeignService", fallback = SmsFeignServiceCallback.class)
public interface SmsFeignService {

    /**
     * 发送短信功能
     * @param phone 手机号
     * @param code 短信验证码
     * @return
     */
    @GetMapping("/sms/sendSmsCode")
    public R sendSmsCode(@RequestParam(value = "phone") String phone, @RequestParam(value = "code") String code);

}
